﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;

using GaugeEngine;
using GaugeEngine.Graphics;

namespace GaugeEngineTest
{
    class Game1 : Game
    {
        Level l1;

        public Game1()
        {
            ContentFactory.RegisterBehaviour("movesleft", MovesLeft.CreateMovesLeft);
            l1 = ContentFactory.LoadLevel(this, "XML/level1.xml");
            EventController.addHandler("KeyPress_Escape", ExitGame);
            EventController.addHandler("XBOX_Button_Back", ExitGame);
        }

        public override void Draw(Painter p)
        {
           p.Clear(Color.GhostWhite);
           p.DrawLine(new Vector(400, 0), new Vector(400, 600), Color.Red);
           l1.Draw(p);
        }

        public override void Update(GameTime gameTime)
        {
            l1.Update(gameTime);
        }
    }
}
